import request from '../index';

export default {
  // 成为分销商
  becomeDistributor: () => request.post('/distribution/become'),
  
  // 获取分销商信息
  getDistributorInfo: () => request.get('/distribution/info'),
  
  // 获取分销统计
  getStats: () => request.get('/distribution/stats'),
  
  // 获取我的分销商品
  getMyGoods: (params) => request.get('/distribution/my-goods', params),
  
  // 添加分销商品
  addGoods: (data) => request.post('/distribution/add-goods', data),
  
  // 移除分销商品
  removeGoods: (data) => request.post('/distribution/remove-goods', data),
  
  // 获取佣金明细
  getCommissionList: (params) => request.get('/distribution/commission-list', params),
  
  // 获取团队成员
  getTeamMembers: (params) => request.get('/distribution/team-members', params),
  
  // 邀请成员
  inviteMember: (data) => request.post('/distribution/invite', data),
  
  // 获取推广数据
  getPromotionData: () => request.get('/distribution/promotion-data'),
  
  // 记录推广点击
  recordClick: (data) => request.post('/distribution/record-click', data),
  
  // 申请提现
  withdraw: (data) => request.post('/distribution/withdraw', data),
  
  // 获取提现记录
  getWithdrawRecords: (params) => request.get('/distribution/withdraw-records', params),
  
  // 获取推广链接
  getPromotionLink: (goodsId) => request.get(`/distribution/promotion-link/${goodsId}`),
  
  // 生成推广海报
  generatePoster: (data) => request.post('/distribution/generate-poster', data),
  
  // 获取推广二维码
  getQRCode: (goodsId) => request.get(`/distribution/qrcode/${goodsId}`),
  
  // 获取收益统计
  getEarningsStats: (params) => request.get('/distribution/earnings-stats', params),
  
  // 获取排行榜
  getRanking: (params) => request.get('/distribution/ranking', params),
  
  // 获取邀请奖励
  getInviteRewards: () => request.get('/distribution/invite-rewards'),
  
  // 绑定邀请人
  bindInviter: (data) => request.post('/distribution/bind-inviter', data),
  
  // 获取邀请记录
  getInviteRecords: (params) => request.get('/distribution/invite-records', params)
};